<?php

class AssessmentQualityAttributesController extends AppController
{
  var $name = 'AssessmentQualityAttributes';
  var $scaffold;
  
  function edit($id)
  {
    $this->AssessmentQualityAttribute->id = $id;
    
    $asmt_qual_attr = $this->AssessmentQualityAttribute->getForId($id);
    $this->set('asmt_qual_attr',$asmt_qual_attr);

    if (!empty($this->data))
    {
      if ($this->AssessmentQualityAttribute->save($this->data))
      {
        $this->flash('Your response has been saved.','/assessments/edit/' . $asmt_qual_attr[0]['a']['id']);
      }
    }
    else
    {
      $this->data = $this->AssessmentQualityAttribute->read();
    }
    
    $this->set('likert_results',$this->AssessmentQualityAttribute->LikertResult->find('list'));   
  }
}
?>